Distinguishing methicillin-resistant Staphylococcus aureus from methicillin-sensitive strains by combining Fe3O4 magnetic nanoparticle-based affinity mass spectrometry with a machine learning strategy

Pathogenic bacteria, including drug-resistant variants such as methicillin-resistant Staphylococcus aureus (MRSA), can cause severe infections in the human body. Early detection of MRSA is essential for clinical diagnosis and proper treatment, considering the distinct therapeutic strategies for methicillin-sensitive S. aureus (MSSA) and MRSA infections. However, the similarities between MRSA and MSSA properties present a challenge in promptly and accurately distinguishing between them. This work introduces an approach to differentiate MRSA from MSSA utilizing matrix-assisted laser desorption ionization mass spectrometry (MALDI-MS) in conjunction with a neural network-based classification model. Four distinct strains of S. aureus were utilized, comprising three MSSA strains and one MRSA strain. The classification accuracy of our model ranges from ~ 92 to ~ 97% for each strain. We used deep SHapley Additive exPlanations to reveal the unique feature peaks for each bacterial strain. Furthermore, Fe3O4 MNPs were used as affinity probes for sample enrichment to eliminate the overnight culture and reduce the time in sample preparation. The limit of detection of the MNP-based affinity approach toward S. aureus combined with our machine learning strategy was as low as ~ 8 × 103 CFU mL−1. The feasibility of using the current approach for the identification of S. aureus in juice samples was also demonstrated. Graphical Abstract Supplementary Information The online version contains supplementary material available at 10.1007/s00604-024-06342-z.


Appendix I 1. Appendix -Neural network-based classification model 1.1. Data preprocessing
In the first stage, we aimed to normalize the mass spectrum intensity data for each S. aureus and extract representative values.The intensity of each data was normalized to one, and a maxpooling process was performed to obtain integer intensity between 3000 and 8000.

Multiclass classification model
We used a feedforward fully-connected neural network as the model.The dimension of the input layer is 5001, which is consistent with the number of input intensities.The output layer has four units to implement quaternary classification.At the last layer, the results are passed into a softmax function to obtain positive values with sum one, and the output class is the one with the most significant magnitude.
For model training, we utilize the conventional cross-entropy loss function and employ the Adam optimizer.

Binary classification model
To obtain a binary classification model, we added a layer to the output of the trained quaternary classification model.This layer does not require training, and its purpose is simply to condense quaternary classification into binary classification.

Validation
We used cross-validation to verify the robustness of the model.In each experiment, we randomly selected 80% of the data as the training set and the remaining 20% as the test set.The final accuracy of our model is the average of 20 experiments.S2.Classification of the target bacteria using our machine learning strategy."O" denotes that data was hit on the right one, whereas "X" indicates that the results were incorrect.

Samples Results
MRSA (OD 10 -4 ) O MRSA (OD 10 -5 ) O MRSA (OD 10 -6 ) X MRSA (OD 10 -7 ) X Table S3.Identification of the target bacteria from the simulated real sample using our machine learning strategy."O" denotes that the data was hit on the right one, whereas "X" indicated that the results were incorrect.

1. 5 .
Feature importanceWe used Deep SHAP [Lundberg, Scott M and Lee, Su-In, A Unified Approach to Interpreting Model Predictions, NIPS (2017), pp.4765-4774] to analyze the model and to find the important features.In the deep SHAP analysis, the mean absolute SHAP value illustrates the importance of each feature, and the sign of the SHAP value signifies which class the feature is most crucial for.

Figure S1 .
Figure S1.Corresponding photographs of the microdilution results by using oxacillin as the antibacterial agent against four model S. aureus strains, including (A) S. aureus clinical strain, (B) S. aureus BCRC 10823, (C) S. aureus BCRC 10831, and (D) MRSA.The red squares indicate where the determined MICs are.The highest and lowest concentrations were labeled on the top of the photographs to represent the 2-fold series dilution.The cartoon illustration showed the OD value obtained in each well1.Tests 1-3 indicate three replicates.

Figure S2 .
Figure S2.Corresponding photographs of the microdilution results by using vancomycin as the antibacterial agent against four model S. aureus strains, including (A) S. aureus clinical strain, (B) S. aureus BCRC 10823, (C) S. aureus BCRC 10831, (D) MRSA clinical strain.The red squares indicate where the determined MICs are.The highest and lowest concentrations were labeled on the top of the photographs to represent the 2-fold series dilution.The cartoon illustration showed the OD value obtained in each well1.Tests 1-3 indicate three replicates.

Table S1 .
The binding capacity of Fe3O4 MNPs toward the S. aureus at different pH values. 9Table